1. Technical Field
The present invention relates to three-dimensional-shape detection apparatuses, three-dimensional-shape detection methods, and three-dimensional-shape detection programs that can detect the boundary of pattern light with sub-pixel precision at high speed without increasing the number of images of the pattern light.
2. Related Art
A commonly-known three-dimensional-shape detection apparatus detects a three-dimensional shape of a target object by using a slit-light projection method, in which one slit light is projected onto the target object successively, an imaging means inputs an image in each direction φ of the projected light, and the position of the target object is detected by obtaining a direction θ of viewing the target object from the imaging means based on the path of the slit light in the image.
In the slit-light projection method, however, the resolution depends on the number of slits, and one video frame is required to obtain a single slit image. Obtaining an image of many slits takes a long time.
As a resolution of the problem, a so-called space code method is proposed in Kosuke Sato, et al. “Distance Image Input by Space Code,” Transactions of the Institute of Electronics and Communication Engineers of Japan, 85/3 Vol. J68-D No. 3, pp. 369-375 (Document 1). In the space code method, n vertically-striped pattern lights are projected onto the target object, and the space is divided into 2n narrow fan-shaped areas. An n-bit binary code (space code) can be assigned to each area, and an image equivalent to a 2n slit image can be obtained by n times of pattern-light projection. Accordingly, the measurement can be made faster, in comparison with the slit-light projection method.
The finite division of the pattern light and the resolution of the imaging element lead to an error in the boundary of the detected pattern light, consequently disabling high-precision detection of the three-dimensional shape of the target object.
A three-dimensional-shape detection technology that can solve the problem is disclosed in Kosuke Sato, et al, “Three-Dimensional Image Measurement,” Shokodo Co., Ltd. pp. 109-117 (Document 2). More specifically, two types of pattern light, positive pattern light and negative pattern light, or reversal of the positive pattern light, are projected onto the target object in the technology disclosed in Document 2. The boundary of the pattern light is interpolated in accordance with the luminance distribution of the image, and the boundary of the pattern light is detected with sub-pixel precision, so that the error included in the boundary coordinates of the pattern light is reduced, enabling the three-dimensional shape of the target object to be detected with high precision.